home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsISOAPCall.idl < prev    next >
Text File  |  2006-05-08  |  6KB  |  137 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 2001
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  26.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. #include "nsISupports.idl"
  39. #include "nsISOAPMessage.idl"
  40.  
  41. interface nsISOAPResponse;
  42. interface nsISOAPResponseListener;
  43. interface nsISOAPCallCompletion;
  44.  
  45. /**
  46.  * This interface is a convenience extension of the basic SOAP message,
  47.  * which handles common patterns of calling, such as providing an
  48.  * action URI in the HTTP header, locating and invoking the appropriate
  49.  * transport based upon the protocol of the transportURI, and
  50.  * automatically recieving the result in a new nsISOAPResponse object
  51.  * which recieves an XML message.
  52.  */
  53.  
  54. [scriptable, uuid(a8fefe40-52bc-11d4-9a57-000064657374)]
  55. interface nsISOAPCall : nsISOAPMessage {
  56.  
  57.   /**
  58.    * The URI to which the message will be sent, identifying the
  59.    *   transport and transport-specific information about the
  60.    *   destination.
  61.    * This does not have to match the <code>targetObjectURI</code>.
  62.    */
  63.   attribute AString transportURI;
  64.  
  65.   /**
  66.    * Enables alternative security model which may be available
  67.    *   from participating services.  Securely adds a 
  68.    *   "verifySource" header to the outgoing message with 
  69.    *   "mustUnderstand" enabled, which permits the server to 
  70.    *   decide whether the call should be honored from that 
  71.    *   particular source.  i
  72.    * <p>When this verification header is enabled, the 
  73.    *   calling script is released from the draconion 
  74.    *   security checks of unverified SOAP calls.  But
  75.    *   the service being invoked must not reject the
  76.    *   message, which is the prescribed action if a SOAP
  77.    *   server receives a header of type "mustUnderstand" that
  78.    *   it does not understand.
  79.    * <p>Servers which accept "verified" messages
  80.    *   containing this header relieve the user of having to
  81.    *   configure and trust the domain of the web page never 
  82.    *   to exploit behind his firewall, because the
  83.    *   responsibility is assumed by the service.  If the
  84.    *   service is not behind a firewall, then merely
  85.    *   ignoring the packet is enough to free all
  86.    *   users of this facility to call the server whatever
  87.    *   their security configurations for unverified calls
  88.    *   may be.  But it only works with services that 
  89.    *   accept these verifySource headers.
  90.    * <p>It is possible for a user to disable even verified
  91.    *   SOAP calls, but this is not the default setting.
  92.    */
  93.   attribute boolean verifySourceHeader;
  94.  
  95.   /**
  96.    * Synchronously invoke the call. The method returns only when 
  97.    * we receive a response (or an error occurs).  The
  98.    * <code>transportURI</code> must have been set, the 
  99.    * parameter list (even if empty) must have been encoded,
  100.    * and the transportURI must use some known protocol.  A
  101.    * synchronous call assumes that there will be exactly one
  102.    * response per call.
  103.    *
  104.    * If not, an error is returned in the status of the response.
  105.    *
  106.    * @returns The SOAP response
  107.    */
  108.   nsISOAPResponse invoke();
  109.  
  110.   /**
  111.    * Asynchronously invoke the call. At this point, the document
  112.    * rooted by the Envelope element is encoded to form the body
  113.    * of the SOAP message. The method returns immediately, and the
  114.    * listener is invoked when we eventually receive a response
  115.    * (or error or successful completion). The
  116.    * <code>transportURI</code> must have been set, the 
  117.    * parameter list (even if empty) must have been encoded,
  118.    * and the transportURI must use some known protocol.
  119.    *
  120.    * If not, an error is returned in the status of the response.
  121.    *
  122.    * @param aListener Handler to be invoked asynchronously after the
  123.    *  response is recieved.  Should be null if no response is
  124.    *  expected.
  125.    */
  126.   nsISOAPCallCompletion asyncInvoke(in nsISOAPResponseListener aListener);
  127. };
  128.  
  129. %{C++
  130. #define NS_SOAPCALL_CID                             \
  131. { /* 87d21ec0-539d-11d4-9a59-00104bdf5339 */        \
  132.   0x87d21ec0, 0x539d, 0x11d4,                       \
  133.  {0x9a, 0x59, 0x00, 0x10, 0x4b, 0xdf, 0x53, 0x39} }
  134. #define NS_SOAPCALL_CONTRACTID \
  135. "@mozilla.org/xmlextras/soap/call;1"
  136. %}
  137.